package com.yunshipei.core.model;

import java.io.Serializable;

public class XDownloadModel implements Serializable {

    private String url;
    private String contentDisposition;
    private String cookie;
    private long contentLength;
    private String fileName;
    private String userAgent;
    private String method = "GET";
    private String formData = "";

    public XDownloadModel(String url, String fileName) {
        this.url = url;
        this.fileName = fileName;
    }

    public XDownloadModel(String url, String contentDisposition, String cookie, long contentLength, String fileName, String userAgent) {
        this.url = url;
        this.contentDisposition = contentDisposition;
        this.cookie = cookie;
        this.contentLength = contentLength;
        this.fileName = fileName;
        this.userAgent = userAgent;
    }

    public XDownloadModel(String url, String method, String cookie, String fileName, String formData) {
        this.url = url;
        this.method = method;
        this.cookie = cookie;
        this.fileName = fileName;
        this.formData = formData;
    }

    public String getUrl() {
        return url;
    }

    public String getContentDisposition() {
        return contentDisposition;
    }

    public String getCookie() {
        return cookie;
    }

    public long getContentLength() {
        return contentLength;
    }

    public String getFileName() {
        return fileName;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public String getMethod() {
        return method;
    }

    public String getFormData() {
        return formData;
    }

    @Override
    public String toString() {
        return url + "\n" + contentDisposition + "\n" + cookie + "\n" + contentLength + "\n" + fileName + "\n" + userAgent + "\n" + method + "\n" + formData;
    }
}
